package com.blitscreen.utils.monitor 
{
	import com.kairos.engine.RTEvent;	
	import com.blitscreen.utils.monitor.AbstractRenderQueueMonitorField;
	import com.blitscreen.render.RenderQueue;
	import com.bourre.structures.Range;	

	/**
	 * @author Cedric Nehemie
	 */
	public class RenderTimeField extends AbstractRenderQueueMonitorField 
	{
		public function RenderTimeField ( renderQueue : RenderQueue, 
										  name : String = "Render time", 
										  dr : Range = null, 
										  col : Number = NaN )
		{
			super( renderQueue, name, 0, "ms", dr, col );
		}
		
		override public function registerValue ( e : RTEvent ) : void
		{
			_nLastValue = _nValue;
			_nValue = _oRenderQueue.getLastRenderTime();
		}
	}
}
